const routes = window.sessionStorage.getItem('SYSTEM') == 'eks-op' ? [
    // eks-op
    {
        path: '/',
        name: 'eks',
        label: '首页',
        redirect: '/eks/goods',
        hidden: true,
        children: [
            {
                path: '/eks/goods',
                name: 'eks_1_goods',
                label: '产品规格',
                redirect: '/eks/goods/list',
                component: () => import('@/components/layouts/index.vue'),
                children: [
                    {
                        path: '/eks/goods/list',
                        name: 'eks_1_goods_list',
                        label: '规格列表',
                        component: () => import('@/views/eks/goods/index.vue'),
                        hidden: true,
                        meta: {
                            path: '/eks/goods',
                            name: 'eks_1_goods'
                        }
                    },
                    {
                        path: 'eks/goods/create',
                        name: 'eks_1_goods_create',
                        label: '导入规格',
                        component: () => import('@/views/eks/goods/create.vue'),
                        hidden: true,
                        meta: {
                            path: '/eks/goods',
                            name: 'eks_1_goods'
                        }
                    },

                    {
                        path: 'eks/goods/update',
                        name: 'eks_1_goods_update',
                        label: '更新规格',
                        component: () => import('@/views/eks/goods/update.vue'),
                        hidden: true,
                        meta: {
                            path: '/eks/goods',
                            name: 'eks_1_goods'
                        }
                    }
                ]
            },
            {
                path: '/eks/configManagment',
                name: 'eks_1_configManagment',
                label: '配置管理',
                redirect: '/eks/configManagment/list',
                component: () => import('@/components/layouts/index.vue'),
                children: [
                  {
                    path: '/eks/configManagment/list',
                    name: 'eks_1_configManagment_list',
                    label: '规格列表',
                    component: () => import('@/views/eks/config/index.vue'),
                    hidden: true,
                    meta: {
                        path: '/eks/configManagment',
                        name: 'eks_1_configManagment'
                    }
                  },
                ]
              },
              {
                path: '/eks/mirrorManagment',
                name: 'eks_1_mirrorManagment',
                label: '镜像管理',
                redirect: '/eks/mirrorManagment/list',
                component: () => import('@/components/layouts/index.vue'),
                children: [
                  {
                    path: '/eks/mirrorManagment/list',
                    name: 'eks_1_mirrorManagment_list',
                    label: '镜像列表',
                    component: () => import('@/views/eks/mirror/index.vue'),
                    hidden: true,
                    meta: {
                        path: '/eks/mirrorManagment',
                        name: 'eks_1_mirrorManagment'
                    }
                  },
                ]
              },
              {
                path: '/eks/bmsGoods',
                name: 'eks_1_bmsGoods',
                label: '裸金属商品',
                redirect: '/eks/bmsGoods/list',
                component: () => import('@/components/layouts/index.vue'),
                children: [
                  {
                    path: '/eks/bmsGoods/list',
                    name: 'eks_2_bmsGoods_list',
                    label: '商品列表',
                    component: () => import('@/views/eks/bms/index.vue'),
                    hidden: true,
                    meta: {
                        path: '/eks/bmsGoods',
                        name: 'eks_1_bmsGoods'
                    }
                  },
                  {
                    path: '/eks/bmsGoods/create',
                    name: 'eks_2_bmsGoods_create',
                    label: '创建裸金属商品',
                    component: () => import('@/views/eks/bms/create.vue'),
                    hidden: true,
                    meta: {
                        path: '/eks/bmsGoods',
                        name: 'eks_1_bmsGoods'
                    }
                  },
                  {
                    path: '/eks/bmsGoods/edit/:id',
                    name: 'eks_2_bmsGoods_edit',
                    label: '修改裸金属商品',
                    component: () => import('@/views/eks/bms/edit.vue'),
                    hidden: true,
                    meta: {
                        path: '/eks/bmsGoods',
                        name: 'eks_1_bmsGoods'
                    }
                  },
                ]
              },
              {
                path: '/eks/edgeCluster',
                name: 'eks_1_edge_cluster',
                label: '边缘集群管理',
                component: () => import('@/components/layouts/index.vue'),
                children: [
                  {
                    path: "/eks/edgeCluster/node",
                    name: "eks_2_edge_node",
                    label: '节点管理',
                    component: () => import('@/components/layouts/index.vue'),
                    redirect: { name: 'eks_2_edge_node_list' },
                    meta: { name: 'eks_1_edge_cluster' },
                    children: [
                      {
                        path: "/eks/edgeCluster/node/list",
                        name: "eks_2_edge_node_list",
                        label: '节点列表',
                        component: () => import('@/views/eks/edge/node/index.vue'),
                        hidden: true,
                        meta: {
                            path: '/eks/edgeCluster/node',
                            name: 'eks_2_edge_node'
                        }
                      },
                      {
                        path: "/eks/edgeCluster/node/add",
                        name: "eks_2_edge_node_add",
                        label: '节点列表',
                        component: () => import('@/views/eks/edge/node/add.vue'),
                        hidden: true,
                        meta: {
                            path: '/eks/edgeCluster/node',
                            name: 'eks_2_edge_node'
                        }
                      }
                    ]
                  }
                ]
              },
              {
                path: '/eks/bmsBillingConversion',
                name: 'eks_1_bmsBillingConversion',
                label: '裸金属节点',
                redirect: '/eks/bmsBillingConversion/list',
                component: () => import('@/components/layouts/index.vue'),
                children: [
                  {
                    path: '/eks/bmsBillingConversion/list',
                    name: 'eks_2_bmsBillingConversion_list',
                    label: '节点列表',
                    component: () => import('@/views/eks/bmsBillingConversion/index.vue'),
                    hidden: true,
                    meta: {
                        path: '/eks/bmsBillingConversion',
                        name: 'eks_1_bmsBillingConversion'
                    }
                  }
                ]
              },
        ]
    },
] : window.sessionStorage.getItem('SYSTEM') == 'eci-op' ? [
    // eci-op
    {
        path: '/',
        name: 'eci',
        label: '首页',
        redirect: '/eci/availableZone',
        hidden: true,
        children: [
            {
                path: '/eci/availableZone',
                name: 'eci_1_available_zone',
                label: 'ECI可用区',
                redirect: '/eci/availableZone/list',
                component: () => import('@/views/eci/layout.vue'),
                children: [
                    {
                        path: '/eci/availableZone/list',
                        name: 'eci_2_available_zone_list',
                        label: '列表',
                        component: () => import('@/views/eci/availableZone/index.vue'),
                        hidden: true,
                        meta: {
                            path: '/eci/availableZone',
                            name: 'eci_1_available_zone'
                        }
                    }
                ]
            },
            {
                path: '/eci/quota',
                name: 'eci_1_quota',
                label: 'ECI权益配额',
                redirect: '/eci/quota/list',
                component: () => import('@/views/eci/layout.vue'),
                children: [
                    {
                        path: '/eci/quota/list',
                        name: 'eci_2_quota_list',
                        label: '列表',
                        component: () => import('@/views/eci/quota/index.vue'),
                        hidden: true,
                        meta: {
                            path: '/eci/quota',
                            name: 'eci_1_quota'
                        }
                    }
                ]
            },
            {
                path: '/eci/specification',
                name: 'eci_1_specification',
                label: 'ECI规格',
                redirect: '/eci/specification/tab',
                component: () => import('@/views/eci/layout.vue'),
                children: [
                    {
                        path: '/eci/specification/tab',
                        name: 'eci_2_specification_tab',
                        label: 'Tab页',
                        component: () => import('@/views/eci/specification/tab.vue'),
                        hidden: true,
                        meta: {
                            path: '/eci/specification',
                            name: 'eci_1_specification'
                        }
                    }
                ]
            },
        ]
    }
] : [
    // cck-op
    {
        path: '/',
        name: 'index',
        label: '首页',
        redirect: { name: 'user' },
        hidden: true,
        children: [
            {
                path: '/cck/user',
                name: 'user',
                label: '客户管理',
                component: () => import('@/components/layouts/index.vue'),
                redirect: { name: 'user_list' },
                children: [
                    {
                        path: '/cck/user/list',
                        name: 'user_list',
                        label: '客户列表',
                        component: () => import('@/views/user/list.vue'),
                        hidden: true,
                        meta: {
                            path: '/cck/user',
                            name: 'user'
                        }
                    },
                    {
                        path: '/cck/user/dashboard/:id',
                        name: 'dashboard',
                        label: '资源概览',
                        component: () => import('@/views/user/dashboard.vue'),
                        hidden: true,
                        meta: {
                            path: '/cck/user',
                            name: 'user'
                        }
                    }
                ]
            },
            {
                path: '/cck/manage',
                name: 'manage',
                label: '集群管理',
                component: () => import('@/components/layouts/index.vue'),
                // redirect: {name: 'cluster'},
                children: [
                    {
                        path: '/cck/manage/cluster',
                        name: 'cluster',
                        label: '集群列表',
                        component: () => import('@/components/layouts/index.vue'),
                        redirect: { name: 'cluster_list' },
                        meta: { name: 'manage' },
                        children: [
                            {
                                path: '/cck/manage/cluster/list',
                                name: 'cluster_list',
                                label: '列表',
                                component: () => import('@/views/cluster/list.vue'),
                                hidden: true,
                                meta: {
                                    path: '/cck/manage/cluster',
                                    name: 'manage'
                                }
                            },
                            {
                                path: '/cck/manage/cluster/detail',
                                name: 'cluster_detail',
                                label: '详情',
                                component: () => import('@/views/cluster/detail.vue'),
                                hidden: true,
                                meta: {
                                    path: '/cck/manage/cluster',
                                    name: 'manage'
                                }
                            }
                        ]
                    },
                    {
                        path: '/cck/manage/node',
                        name: 'node',
                        label: '节点列表',
                        component: () => import('@/components/layouts/index.vue'),
                        redirect: { name: 'node_list' },
                        meta: { name: 'manage' },
                        children: [
                            {
                                path: '/cck/manage/node/list',
                                name: 'node_list',
                                label: '列表',
                                component: () => import('@/views/cluster/node/list.vue'),
                                hidden: true,
                                meta: {
                                    path: '/cck/manage/node',
                                    name: 'manage'
                                }
                            }
                        ]
                    },
                    {
                        path: '/cck/manage/snat',
                        name: 'snat',
                        label: 'nat列表',
                        component: () => import('@/components/layouts/index.vue'),
                        redirect: { name: 'snat_list' },
                        meta: { name: 'manage' },
                        children: [
                            {
                                path: '/cck/manage/snat/list',
                                name: 'snat_list',
                                label: '列表',
                                component: () => import('@/views/snat/list.vue'),
                                hidden: true,
                                meta: {
                                    path: '/cck/manage/snat',
                                    name: 'manage'
                                }
                            }
                        ]
                    }
                ]
            },
            // 后端返回 缺少数据 去掉
            // {
            //     path: '/cck/calculator',
            //     name: 'calculator',
            //     label: '价格计算器',
            //     component: () => import('@/views/calculator'),
            //     meta: {
            //         path: '/cck/calculator',
            //         noAuth: true,
            //     }
            // },
            {
                path: '/cck/console/:id/:os_type/:name',
                // path: '/console',
                name: 'console',
                label: 'Web控制台',
                component: () => import('@/views/console/index.vue'),
                meta: {
                    path: '/cck/console',
                    hideNavBar: true
                }
            },
            {
                path: '/console/:id/:os_type/:name',
                // path: '/console',
                name: 'console',
                label: 'Web控制台',
                component: () => import('@/views/console/index.vue'),
                meta: {
                    path: '/console',
                    hideNavBar: true
                }
            },
            {
                path: '/harbor',
                name: 'harbor',
                label: '镜像管理',
                redirect: { name: 'harbor_list' },
                component: () => import('@/components/layouts/index.vue'),
                children: [
                    {
                        path: '/harbor/list',
                        name: 'harbor_list',
                        label: '镜像',
                        component: () => import('@/views/harbor/list.vue'),
                        hidden: true,
                        meta: {
                            path: '/harbor',
                            name: 'harbor'
                        }
                    },
                ]
            },
            {
                path: '/dpvs',
                name: 'dpvs',
                label: '高性能出网网关',
                redirect: { name: 'dpvs_list' },
                component: () => import('@/components/layouts/index.vue'),
                children: [
                    {
                        path: '/dpvs/list',
                        name: 'dpvs_list',
                        label: 'dpvs列表',
                        component: () => import('@/views/dpvs/list.vue'),
                        meta: {
                            name: 'dpvs'
                        },
                        children: [
                            {
                                path: '/dpvs/list/list',
                                name: 'dpvs_manage_list',
                                label: '列表',
                                component: () => import('@/views/dpvs/list.vue'),
                                hidden: true,
                                meta: {
                                    path: '/dpvs',
                                    name: 'dpvs'
                                }
                            }
                        ]

                    },
                    {
                        path: '/dpvs/vm',
                        name: 'dpvs_vm',
                        label: 'dpvs云服务器',
                        component: () => import('@/views/dpvs/vm.vue'),
                        meta: {
                            name: 'dpvs'
                        },
                        children: [
                            {
                                path: '/dpvs/vm/list',
                                name: 'dpvs_vm_list',
                                label: '列表',
                                component: () => import('@/views/dpvs/vm.vue'),
                                hidden: true,
                                meta: {
                                    path: '/dpvs',
                                    name: 'dpvs'
                                }
                            }
                        ]

                    }
                ]
            },
            {
                path: '/outip',
                name: 'outip',
                label: 'GIC出网IP管理',
                component: () => import('@/components/layouts/index.vue'),
                redirect: { name: 'outip_list' },
                children: [
                    {
                        path: '/outip/list',
                        name: 'outip_list',
                        label: '列表',
                        component: () => import('@/views/outip/list.vue'),
                        hidden: true,
                        meta: {
                            path: '/outip',
                            name: 'outip'
                        }
                    }
                ]
            }
        ]
    },
]
export default routes

